import json


def clean_des(describe):
    """
    清除describe中包含的<div>标签
    :param describe:
    :return:
    """
    start_pos = describe.find('<')
    while start_pos != -1:
        end_pos = describe.find('>')
        describe = describe[:start_pos]+describe[end_pos+1:]
        start_pos = describe.find('<')
    return describe


def read_apis():
    with open("../data/apis.json", 'r', encoding='utf-8') as file:
        apis = json.load(file)

    # 读取出来的内容是list,list中包含大量的dict
    first_item = apis[0]
    # for key,value in first_item.items():
    #     print(key+" :", value)
    # 去除<div>标签


def read_article():
    with open("../data/articles.json", 'r', encoding='utf-8') as file:
        articles = json.load(file)
    print(type(articles))
    print(len(articles))


if __name__ == "__main__":
    read_article()
